package 预习的;

public class 找到最小值 {

    public static void main(String[] args) {
        double[] arr = {12.9,53.54,75.0,99.1,3.14};

       double min =  getMin(arr);

        System.out.println("最小值是"+min);
    }

    public static double getMin(double[] arr){

        double min = arr[0];

        for (int i = 0; i < arr.length; i++) {

            if(arr[i]<min){
                min = arr[i];
            }
        }
        return min;
    }
}
